Classic gapminder
Code in the next page
6/22/2021
Code in the next page
gapminder%>%
group_by(year,continent)%>%
summarize(across(c(pop,lifeExp,gdpPercap),
~sum(.x,na.rm=TRUE)),
.groups = "drop")%>%
plotly::plot_ly(x=~pop,y=~lifeExp,size=~gdpPercap,color=~continent,frame = ~year,
type="scatter",mode="markers")